package test2;

import java.util.ArrayList;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-04-01
 * Time: 14:37
 */

class LCA {
    public int getLCA(int a, int b) {
        // write code here
        while (a != b) {
            if (a > b) {
                a /= 2;
            } else {
                b /= 2;
            }
        }
        return a;
    }
}


public class Main {
    public static void main(String[] args) {
    }
}
